Repository navigation
feat(cli): check warns on a small headline and a narrow kinetic hero word - #5
Merged
Merged
Conversation
…word Two craft warnings beside text_below_floor (28 px on 1080): - headline_small: a frame's largest reading text stays under 56 px on 1080 (5.2% of the short side) for 0.5 s or more. - hero_word_narrow: under a data-kinetic-type element, a frame's largest line spans under 60% of the frame's width at its median size. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motion videos were shipping titles too small to read. The house style says headlines are 56–96 px and reading text is never under 28 px; kinetic type says hero words fill 60–90% of the width. A 9:16 quote Reel came out with hero words at 45–50% of the width.
checkalready warns on text under 28 px (text_below_floor). This adds the two sizes it didn't measure, as craft warnings in the same format, on the same 8 fps sweep.headline_small: a frame's largest reading text stays under 5.2% of the short side (56 px on 1080) for 0.5 s or more. It's judged at the largest size it reaches, so a headline that scales in isn't flagged. Text under the type floor is left totext_below_floor, so nothing is reported twice. One finding per file.hero_word_narrow: for text under adata-kinetic-typeelement, each frame's largest line is the hero. It warns when the hero spans under 60% of the frame's width at its median width, so a slam-in at 1.35x doesn't hide a narrow resting word. One finding per file.The browser sample now marks each text part
kinetic; everything else is Node-side incraftAudit.ts. The hold-and-run logictext_below_floorused is shared withheadline_small.Tests
craftAudit.test.ts: thresholds, the warnings, scale-in, flashes, captions, and the hand-off totext_below_floor.craftTypeSize.chromium.test.tsrunsrunAuditGridin real Chromium:text_below_floorheadline_smallGOat 200 px getshero_word_narrowRegistry examples:
hyperframes checkreturns the sameokas before on all 8 (these are warnings only).headline_smallwarns on 4 of them, and each one really is under the house size: nyt-graphh1.headlineis 48 px, product-promo's tagline 44 px, warm-grain "Editing Skills" 54 px, kinetic-type's "animations" label 40 px. None of the examples hasdata-kinetic-type.🤖 Generated with Claude Code